<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>模版的示例 | Leon&#39;s blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="1. 模板程序实例 – 函数模板设计两个函数模板，其功能分别是返回两个值中的较大者和返回多个值中的较大者。要求不仅能够处理整型、实型等数值型数据，而且能够正确处理字符串。">
<meta property="og:type" content="article">
<meta property="og:title" content="模版的示例">
<meta property="og:url" content="https://leonlee233.github.io/2020/06/14/%E6%A8%A1%E7%89%88%E7%9A%84%E7%A4%BA%E4%BE%8B/index.html">
<meta property="og:site_name" content="Leon&#39;s blog">
<meta property="og:description" content="1. 模板程序实例 – 函数模板设计两个函数模板，其功能分别是返回两个值中的较大者和返回多个值中的较大者。要求不仅能够处理整型、实型等数值型数据，而且能够正确处理字符串。">
<meta property="og:locale">
<meta property="article:published_time" content="2020-06-14T13:27:55.000Z">
<meta property="article:modified_time" content="2023-10-26T05:47:04.159Z">
<meta property="article:author" content="Leon Lee">
<meta property="article:tag" content="学习心得">
<meta property="article:tag" content="Hide">
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="@https:&#x2F;&#x2F;twitter.com&#x2F;leonwithleo">
  
    <link rel="alternate" href="/atom.xml" title="Leon's blog" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
  
<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Leon&#39;s blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"><span class="fa fa-bars"></span></a>
        
          <a class="main-nav-link" href="/">主页</a>
        
          <a class="main-nav-link" href="/archives">归档</a>
        
      </nav>
      <nav id="sub-nav">
        
        
          <a class="nav-icon" href="/atom.xml" title="RSS Feed"><span class="fa fa-rss"></span></a>
        
        <a class="nav-icon nav-search-btn" title="Suche"><span class="fa fa-search"></span></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Suche"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://leonlee233.github.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-模版的示例" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2020/06/14/%E6%A8%A1%E7%89%88%E7%9A%84%E7%A4%BA%E4%BE%8B/" class="article-date">
  <time class="dt-published" datetime="2020-06-14T13:27:55.000Z" itemprop="datePublished">2020-06-14</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      模版的示例
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h3 id="1-模板程序实例-–-函数模板"><a href="#1-模板程序实例-–-函数模板" class="headerlink" title="1. 模板程序实例 – 函数模板"></a>1. 模板程序实例 – 函数模板</h3><p>设计两个函数模板，其功能分别是返回两个值中的较大者和<br>返回多个值中的较大者。要求不仅能够处理整型、实型等数值型数据，<br>而且能够正确处理字符串。</p>
<span id="more"></span> 
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br></pre></td><td class="code"><pre><span class="line">// FunctionTemplate.h</span><br><span class="line"><span class="comment">#ifndef _FUNCTIONTEMPLATE_H</span></span><br><span class="line"><span class="comment">#define _FUNCTIONTEMPLATE_H</span></span><br><span class="line">template &lt;typename T&gt; T mymax(T x, T y)</span><br><span class="line">&#123;</span><br><span class="line">    cout&lt;&lt;<span class="string">&quot;template &lt;typename T&gt; T mymax(T x, T y)被调用！&quot;</span>&lt;&lt;<span class="string">endl;</span></span><br><span class="line"><span class="string">    return x&gt;y?x:y; </span></span><br><span class="line"><span class="string">&#125;</span></span><br><span class="line"><span class="string">template &lt;typename T&gt; T mymax(T arr[], int nSize)</span></span><br><span class="line"><span class="string">&#123;</span></span><br><span class="line"><span class="string">    T tmax = arr[0];</span></span><br><span class="line"><span class="string">    int nI;</span></span><br><span class="line"><span class="string">    for (nI = 1; nI &lt; nSize; nI++)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (tmax &lt; arr[nI])</span></span><br><span class="line"><span class="string">        tmax = arr[nI];</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string">    cout&lt;&lt;&quot;template &lt;typename T&gt; T mymax(T arr[], int nSize)被调用！&quot;&lt;&lt;endl</span>;</span><br><span class="line">    <span class="built_in">return</span> tmax; </span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">#endif // end of _FUNCTIONTEMPLATE_H</span></span><br><span class="line">  </span><br><span class="line">// testFunctionTemplate.cpp</span><br><span class="line"><span class="comment">#include &quot;FunctionTemplate.h&quot;</span></span><br><span class="line"><span class="comment">#include &lt;iostream&gt;</span></span><br><span class="line">using namespace std;</span><br><span class="line">char* mymax(char* cStr1, char* cStr2)</span><br><span class="line">&#123;</span><br><span class="line">    cout&lt;&lt;<span class="string">&quot;char* mymax(char* cStr1, char* cStr2)被调用！&quot;</span>&lt;&lt;<span class="string">endl;</span></span><br><span class="line"><span class="string">    if (strcmp(cStr1, cStr2) &gt; 0)</span></span><br><span class="line"><span class="string">    return cStr1;</span></span><br><span class="line"><span class="string">    else</span></span><br><span class="line"><span class="string">    return cStr2;</span></span><br><span class="line"><span class="string">&#125;</span></span><br><span class="line"><span class="string">char* mymax(char* cStrArray[], int nSize) </span></span><br><span class="line"><span class="string">&#123;</span></span><br><span class="line"><span class="string">    int nI;</span></span><br><span class="line"><span class="string">    char* cMaxStr = cStrArray[0];</span></span><br><span class="line"><span class="string">    for (nI = 1; nI &lt; nSize; nI++)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        if (strcmp(cStrArray[nI], cMaxStr) &gt; 0)</span></span><br><span class="line"><span class="string">        &#123;</span></span><br><span class="line"><span class="string">            cMaxStr = cStrArray[nI];</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string">    cout&lt;&lt;&quot;char* mymax(char* cStrArray[], int nSize)被调用！&quot;&lt;&lt;endl</span>;</span><br><span class="line">    <span class="built_in">return</span> cMaxStr; </span><br><span class="line">&#125;</span><br><span class="line">int <span class="function"><span class="title">main</span></span>()</span><br><span class="line">&#123;</span><br><span class="line">    int nArr[] = &#123;3, 5, 7, 16, 9, 2&#125;;</span><br><span class="line">    double dArr[] = &#123;3.5, 7.2, 4.3, 6.8&#125;;</span><br><span class="line">    char cArr[] = &#123;<span class="string">&#x27;a&#x27;</span>, <span class="string">&#x27;d&#x27;</span>, <span class="string">&#x27;i&#x27;</span>, <span class="string">&#x27;e&#x27;</span>&#125;;</span><br><span class="line">    char* cStrArr[] = &#123;<span class="string">&quot;Beijing&quot;</span>, <span class="string">&quot;Shanghai&quot;</span>, <span class="string">&quot;Tianjin&quot;</span>&#125;;</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(3, 5)&lt;&lt;endl; // 实例化：int mymax</span>(int x, int y)</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(3.5, 4.6)&lt;&lt;endl; // 实例化：double mymax</span>(double x,double y)</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(&#x27;a&#x27;, &#x27;b&#x27;)&lt;&lt;endl; // 实例化：char mymax</span>(char x, char y)</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(cStrArr[0], cStrArr[1])&lt;&lt;endl; // char* mymax</span>(char* cStr1, char* cStr2)</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(nArr, sizeof(nArr)/sizeof(nArr[0]))&lt;&lt;endl; // 实例化：int mymax</span>(int arr[], int nSize)</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(dArr, sizeof(dArr)/sizeof(dArr[0]))</span></span><br><span class="line"><span class="string">    &lt;&lt;endl; // 实例化：double mymax</span>(double arr[], int nSize)</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(cArr, sizeof(cArr)/sizeof(cArr[0]))</span></span><br><span class="line"><span class="string">    &lt;&lt;endl; // 实例化：char mymax</span>(char arr[], int nSize)</span><br><span class="line">    cout&lt;&lt;<span class="string">mymax(cStrArr, sizeof(cStrArr)/sizeof(cStrArr[0]))</span></span><br><span class="line"><span class="string">    &lt;&lt;endl; // char* mymax</span>(char* cStrArray[], int nSize)</span><br><span class="line">    <span class="built_in">return</span> 0;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>运行结果：<br>template <typename T> T mymax(T x, T y)被调用！<br>5<br>template <typename T> T mymax(T x, T y)被调用！<br>4.6<br>template <typename T> T mymax(T x, T y)被调用！<br>b<br>char* mymax(char* cStr1, char* cStr2)被调用！<br>Shanghai<br>template <typename T> T mymax(T arr[], int nSize)被调用！<br>16<br>template <typename T> T mymax(T arr[], int nSize)被调用！<br>7.2<br>template <typename T> T mymax(T arr[], int nSize)被调用！<br>i<br>char* mymax(char* cStrArray[], int nSize)被调用！<br>Tianjin</p>
<h3 id="2-模板程序实例-–-类模板"><a href="#2-模板程序实例-–-类模板" class="headerlink" title="2. 模板程序实例 – 类模板"></a>2. 模板程序实例 – 类模板</h3><p>这里直接给出示例:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br></pre></td><td class="code"><pre><span class="line">// ArrayTemplate.h</span><br><span class="line"><span class="comment">#ifndef _ARRAYTEMPLATE_H</span></span><br><span class="line"><span class="comment">#define _ARRAYTEMPLATE_H</span></span><br><span class="line"><span class="comment">#include &lt;iostream&gt;</span></span><br><span class="line">using namespace std;</span><br><span class="line">template &lt;class T&gt;</span><br><span class="line">class Array</span><br><span class="line">&#123;</span><br><span class="line">    public:</span><br><span class="line">        Array(int nSize); // 构造函数</span><br><span class="line">        ~Array(); // 析构函数</span><br><span class="line">        T&amp; operator[](int nIndex); // []运算符重载</span><br><span class="line">        int <span class="function"><span class="title">Size</span></span>() &#123; <span class="built_in">return</span> m_nSize; &#125; // 获取数组元素个数</span><br><span class="line">        bool AddNewElements(int nAddSize); // 添加新的数组元素</span><br><span class="line">        void Display();</span><br><span class="line">    private:</span><br><span class="line">        T *m_pArray;</span><br><span class="line">        int m_nSize;</span><br><span class="line">&#125;;</span><br><span class="line">template &lt;class T&gt;</span><br><span class="line">Array&lt;T&gt;::Array(int nSize) </span><br><span class="line">&#123;</span><br><span class="line">    m_nSize = nSize;</span><br><span class="line">    m_pArray = new T[nSize+1];</span><br><span class="line">&#125;</span><br><span class="line">template &lt;class T&gt;</span><br><span class="line">Array&lt;T&gt;::~<span class="function"><span class="title">Array</span></span>()</span><br><span class="line">&#123; delete []m_pArray; &#125;</span><br><span class="line">template &lt;class T&gt;</span><br><span class="line">T&amp; Array&lt;T&gt;::operator[](int nIndex)</span><br><span class="line"> &#123;</span><br><span class="line">    <span class="keyword">if</span> (nIndex&lt;0 || nIndex&gt;=m_nSize)</span><br><span class="line">    &#123;</span><br><span class="line">        cout&lt;&lt;<span class="string">&quot;数组下标越界！&quot;</span>&lt;&lt;<span class="string">endl;</span></span><br><span class="line"><span class="string">        nIndex = m_nSize;</span></span><br><span class="line"><span class="string">        // 用多余的数组元素存储无效值</span></span><br><span class="line"><span class="string">        m_pArray[nIndex] = 0;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string">    return m_pArray[nIndex];</span></span><br><span class="line"><span class="string">&#125;</span></span><br><span class="line"><span class="string">template &lt;class T&gt;</span></span><br><span class="line"><span class="string">void Array&lt;T&gt;::Display()</span></span><br><span class="line"><span class="string">&#123;</span></span><br><span class="line"><span class="string">    int nI;</span></span><br><span class="line"><span class="string">    for (nI = 0; nI &lt; m_nSize; nI++)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        cout&lt;&lt;m_pArray[nI]&lt;&lt;&quot; &quot;;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string">    cout&lt;&lt;endl</span>; </span><br><span class="line">&#125;</span><br><span class="line">template &lt;class T&gt;</span><br><span class="line">bool Array&lt;T&gt;::AddNewElements(int nAddSize) </span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">if</span> (nAddSize &lt;= 0)</span><br><span class="line">    &#123;</span><br><span class="line">        cout&lt;&lt;<span class="string">&quot;新增加的数组元素个数必须大于0！&quot;</span>&lt;&lt;<span class="string">endl;</span></span><br><span class="line"><span class="string">        return false;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string">    T *pNewArray = new T[nAddSize+m_nSize+1];</span></span><br><span class="line"><span class="string">    if (pNewArray == NULL)</span></span><br><span class="line"><span class="string">    &#123;</span></span><br><span class="line"><span class="string">        cout&lt;&lt;&quot;新增加数组元素内存分配失败！&quot;&lt;&lt;endl</span>;</span><br><span class="line">        <span class="built_in">return</span> <span class="literal">false</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">for</span> (int nI=0; nI&lt;m_nSize; nI++) // 将元素复制到新的数组中</span><br><span class="line">    pNewArray[nI] = m_pArray[nI];</span><br><span class="line">    delete []m_pArray; // 将原数组内存释放</span><br><span class="line">    m_pArray = pNewArray; // 设置新数组</span><br><span class="line">    m_nSize += nAddSize;</span><br><span class="line">    <span class="built_in">return</span> <span class="literal">true</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">#endif // end of _ARRAYTEMPLATE_H</span></span><br><span class="line">// testArrayTemplate.cpp</span><br><span class="line"><span class="comment">#include &quot;ArrayTemplate.h&quot;</span></span><br><span class="line">int <span class="function"><span class="title">main</span></span>()</span><br><span class="line">&#123;</span><br><span class="line">    Array&lt;int&gt; nArray(10);</span><br><span class="line">    Array&lt;double&gt; dArray(10);</span><br><span class="line">    Array&lt;char&gt; cArray(10);</span><br><span class="line">    int nI;</span><br><span class="line">    <span class="keyword">for</span> (nI = 0; nI &lt; 10; nI++)</span><br><span class="line">    &#123;</span><br><span class="line">        nArray[nI] = nI;</span><br><span class="line">        dArray[nI] = nI+9.8;</span><br><span class="line">        cArray[nI] = nI+<span class="string">&#x27;a’;</span></span><br><span class="line"><span class="string">    &#125;</span></span><br><span class="line"><span class="string">    nArray.Display();</span></span><br><span class="line"><span class="string">    dArray.Display();</span></span><br><span class="line"><span class="string">    cArray.Display();</span></span><br><span class="line"><span class="string">    nArray[10] = 20;</span></span><br><span class="line"><span class="string">    nArray.Display();</span></span><br><span class="line"><span class="string">    nArray.AddNewElements(1);</span></span><br><span class="line"><span class="string">    nArray[10] = 20;</span></span><br><span class="line"><span class="string">    nArray.Display();</span></span><br><span class="line"><span class="string">    return 0;</span></span><br><span class="line"><span class="string">&#125;</span></span><br></pre></td></tr></table></figure>
<p>输出结果：<br>0 1 2 3 4 5 6 7 8 9<br>9.8 10.8 11.8 12.8 13.8 14.8 15.8 16.8 17.8<br>18.8<br>a b c d e f g h i j<br>数组下标越界！<br>0 1 2 3 4 5 6 7 8 9<br>0 1 2 3 4 5 6 7 8 9 20</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://leonlee233.github.io/2020/06/14/%E6%A8%A1%E7%89%88%E7%9A%84%E7%A4%BA%E4%BE%8B/" data-id="clo6uzd8q000u8cuk0gmc3cc2" data-title="模版的示例" class="article-share-link"><span class="fa fa-share">Teilen</span></a>
      
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hide/" rel="tag">Hide</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%AD%A6%E4%B9%A0%E5%BF%83%E5%BE%97/" rel="tag">学习心得</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2020/06/15/%E8%BF%90%E7%AE%97%E7%AC%A6%E9%87%8D%E8%BD%BD%E7%9F%A5%E8%AF%86%E7%82%B9%E5%8F%8A%E7%A4%BA%E4%BE%8B/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Neuer</strong>
      <div class="article-nav-title">
        
          运算符重载知识点及示例
        
      </div>
    </a>
  
  
    <a href="/2020/06/13/%E6%A8%A1%E7%89%88/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Älter</strong>
      <div class="article-nav-title">C++模版</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hide/" rel="tag">Hide</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Literature-Review/" rel="tag">Literature Review</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%9B%9E%E5%BF%86%E5%BD%95/" rel="tag">回忆录</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%A5%87%E6%80%AA%E7%9A%84%E7%A2%8E%E7%A2%8E%E5%BF%B5/" rel="tag">奇怪的碎碎念</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%AD%A6%E4%B9%A0%E5%BF%83%E5%BE%97/" rel="tag">学习心得</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" rel="tag">学习笔记</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%91%84%E5%BD%B1/" rel="tag">摄影</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%95%99%E7%A8%8B/" rel="tag">教程</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%B8%B8%E8%AE%B0/" rel="tag">游记</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%BE%8E%E5%9B%BE/" rel="tag">美图</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Hide/" style="font-size: 20px;">Hide</a> <a href="/tags/Literature-Review/" style="font-size: 10px;">Literature Review</a> <a href="/tags/%E5%9B%9E%E5%BF%86%E5%BD%95/" style="font-size: 12px;">回忆录</a> <a href="/tags/%E5%A5%87%E6%80%AA%E7%9A%84%E7%A2%8E%E7%A2%8E%E5%BF%B5/" style="font-size: 10px;">奇怪的碎碎念</a> <a href="/tags/%E5%AD%A6%E4%B9%A0%E5%BF%83%E5%BE%97/" style="font-size: 18px;">学习心得</a> <a href="/tags/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" style="font-size: 10px;">学习笔记</a> <a href="/tags/%E6%91%84%E5%BD%B1/" style="font-size: 14px;">摄影</a> <a href="/tags/%E6%95%99%E7%A8%8B/" style="font-size: 16px;">教程</a> <a href="/tags/%E6%B8%B8%E8%AE%B0/" style="font-size: 12px;">游记</a> <a href="/tags/%E7%BE%8E%E5%9B%BE/" style="font-size: 10px;">美图</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archiv</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/10/">October 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/07/">July 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/11/">November 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/06/">June 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/06/">June 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/05/">May 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/04/">April 2020</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">letzter Beitrag</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2023/10/26/DETR%E7%AC%94%E8%AE%B0/">文章总结：DETR笔记</a>
          </li>
        
          <li>
            <a href="/2023/07/14/%E4%B8%80%E4%B8%AA%E5%A5%BD%E7%9A%84%E5%BC%80%E5%A7%8B/">一个好的开始</a>
          </li>
        
          <li>
            <a href="/2021/11/20/linux%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%AE%89%E8%A3%85/">linux系统的安装</a>
          </li>
        
          <li>
            <a href="/2021/11/20/%E5%A4%A7%E6%95%B0%E6%8D%AE%E5%9F%BA%E7%A1%80step1-hadoop/">大数据基础step1:hadoop</a>
          </li>
        
          <li>
            <a href="/2021/06/05/Linux%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/">Linux学习笔记</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2023 Leon Lee<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">主页</a>
  
    <a href="/archives" class="mobile-nav-link">归档</a>
  
</nav>
    


<script src="/js/jquery-3.6.4.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>